<template>
  <div class="row">
    <div class="col-sm-6">
      <label for="inputPassword" class="col-sm-2 col-form-label">阶段编号</label>
    </div>
    <div class="col-sm-6">
      {{ stage.id }}
    </div>
    <div class="col-sm-6">
      <label for="inputPassword" class="col-sm-2 col-form-label">阶段名称</label>
    </div>
    <div class="col-sm-6">
      {{ stage.stname }}
    </div>
    <div class="col-sm-6">
      <label for="inputPassword" class="col-sm-2 col-form-label">所属学科</label>
    </div>
    <div class="col-sm-6">
      {{ stage.subject.sname }}
    </div>
    <router-link to="/stage/list" class="btn btn-secondary">返回</router-link>
  </div>
</template>

<script>
export default {
  name: "StageView",
  data() {
    return {
      stage: {}
    }
  },
  props: {
    id: {
      required: true
    }
  },
  mounted() {
    this.$parent.stageTitle = "查看阶段信息";
    this.getStage();
  },
  methods: {
    getStage() {
      this.axiosJSON.get("/stage/getOne?id=" + this.id).then(result => {
        this.stage = result.data.data;
      });
    }
  }
}
</script>

<style>
</style>